package com.planesnet.notification2;

import java.util.ArrayList;

public class Notification {
	public static int base_id=0;
	
	private int id;
	private String title;
	private String description;
	private boolean autoCancel;
	private int updates;
	private ArrayList<String> descriptions = new ArrayList<String>();

	
	public Notification() {
		base_id++;
		id = base_id;
		title= "";
		description= "";
		autoCancel = false;
		updates = 0;
	}
	
	
	
	public int getId() {
		return id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * Return last description.
	 * @return
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Return all descriptions.
	 * @param description
	 */
	public String[] getDescriptions() {
		String[] x = new String[descriptions.size()];
		return descriptions.toArray(x);
	}

	
	public void setDescription(String description) {
		this.description = description;
		descriptions.add(0,description);

	}

	public boolean isAutoCancel() {
		return autoCancel;
	}

	public void setAutoCancel(boolean autoCancel) {
		this.autoCancel = autoCancel;
	}

	public void update() {
		updates++;
	}
	public int getUpdates() {
		return updates;
	}
}
